package com.gxxy.spring.kp02_modules.cls01_test;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
//@ContextConfiguration("TestModuleTest.xml")
@ContextConfiguration
public class TestModuleTest {

	@Autowired //DI
	BeanFactory factory;
	
	@Test
	public void testTestModule() throws Exception {
		ITestModule testModule = factory.getBean("testModuleBean", ITestModule.class);
		testModule.sayTestModule();
	}
	
}
